import React from 'react';
import { View, Text } from 'react-native';
import { Ionicons } from '@expo/vector-icons';

interface EmptyStateProps {
  title?: string;
  message?: string;
  icon?: string;
}

/**
 * 空状态组件 - 在列表为空时显示友好的提示信息
 */
const EmptyState: React.FC<EmptyStateProps> = ({
  title = "暂无内容",
  message = "还没有任何帖子，快来发布第一个吧！",
  icon = "document-text-outline"
}) => {
  return (
    <View className="flex-1 items-center justify-center px-8 py-12">
      <View className="bg-gray-100 rounded-full p-6 mb-4">
        <Ionicons 
          name={icon as any} 
          size={48} 
          color="#9CA3AF" 
        />
      </View>
      
      <Text className="text-xl font-semibold text-gray-900 mb-2 text-center">
        {title}
      </Text>
      
      <Text className="text-gray-500 text-center leading-6">
        {message}
      </Text>
    </View>
  );
};

export default EmptyState; 